//@json
function main(tbl){
	let cnd=Cnd.where("1","=",1)
	if(!isEmpty(tbl.name)){
		cnd.and("name","like",tbl.name+"%")
	}
	if(!isEmpty(tbl.type)){
		cnd.and("type","=",tbl.type)
	}
	return dao.query("sys_unit",cnd);
}